# -*- coding: utf-8 -*-

import json

a = [['https://image.cosme-de.net/html/images/AB00246.jpg'], ['https://image.cosme-de.net/html/images/ABS0246.jpg'],
     ['https://image.cosme-de.net/html/images/ABS0246.jpg']]


def json_img():
    k = []
    for item in a:
        for i in item:
            k.append(i)

    return json.dumps({'images': k})


print(json_img())


from urllib.parse import urlsplit

url = 'https://npcitem.jd.hk/72040202995.html#crumb-wrap'

path = urlsplit(url).path.strip('/.html')
print(path)
